package astudy.tree.impl;

import astudy.tree.TreeNode;

public class BSTreeNode<T extends Comparable> implements TreeNode<T> {

	private BSTreeNode<T> parent;
	private BSTreeNode<T> left;
	private BSTreeNode<T> right;
	private T data;
	
	public BSTreeNode(T data) {
		this.data = data;
		this.left = null;
		this.right = null;
		this.parent = null;
	}
	
	public T getData() {
		return data;
	}
	public void setData(T data) {
		this.data = data;
	}
	public BSTreeNode<T> getLeft() {
		return left;
	}
	public void setLeft(BSTreeNode<T> left) {
		this.left = left;
	}
	public BSTreeNode<T> getRight() {
		return right;
	}
	public void setRight(BSTreeNode<T> right) {
		this.right = right;
	}
	public BSTreeNode<T> getParent() {
		return parent;
	}
	public void setParent(BSTreeNode<T> parent) {
		this.parent = parent;
	}
}
